package com.cctv.order.exception;

import com.cctv.order.enums.ResultEnum;

/**
 * 订单异常
 *
 * @Author: cctv
 * @Date: 2019/6/5 16:08
 */
public class OrderException extends RuntimeException {

    /**
     * 异常类型
     */
    private Integer code;

    public OrderException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public OrderException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }
}